Fix ArtifactEngine CI test failures by updating nock to v14#1352
Open
v-abhishera wants to merge 2 commits intomasterfrom
Open
Fix ArtifactEngine CI test failures by updating nock to v14#1352v-abhishera wants to merge 2 commits intomasterfrom
v-abhishera wants to merge 2 commits intomasterfrom
Conversation
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description:
Summary
The ArtifactEngine integration tests fail in CI because
nock@9.1.0is incompatible with Node 24's stricter stream type checking. This PR updates nock to v14 and fixes related test issues.Root Cause
The CI pipeline uses Node 24 (azure-pipelines-extensions.yml).
nock@9.1.0relies on internal Node stream APIs that changed in Node 24, causingTypeErrorcrashes in all nock-based integration tests.Changes
nock:9.1.0→^14.0.6nock.disableNetConnect()+nock.enableNetConnect('127.0.0.1')with comment inbeforeEachredvstt-lab43:8080with127.0.0.1:9011; replaced 2x deprecatednew Buffer()withBuffer.from()Detail
nock
9.1.0→^14.0.6— nock v9 uses Node stream internals incompatible with Node 24.nock.disableNetConnect()/nock.enableNetConnect('127.0.0.1')— Required by nock v14's stricter interceptor model. Localhost is allowed so proxy tests (which use a real local server on127.0.0.1:9011) sharing the same mocha process are not blocked.redvstt-lab43:8080→127.0.0.1:9011— The old hostname was a decommissioned dev machine. The proxy test spins up its own local server on port 9011, so the endpoint URL should point there.new Buffer()→Buffer.from()—Buffer()constructor is deprecated since Node 6 and removed in newer versions.Testing
gulp build && gulp test --suite=ArtifactEngine)Risk Assessment
Low — devDependency + test-only changes. No production code affected.